home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / PCI Driver Development Kit / • Tools / Utility / PCISlots / Resources / PCISlots.r next >
Encoding:
Text File  |  1996-08-20  |  9.7 KB  |  486 lines  |  [TEXT/MPS ]

  1. // Copyright © 1995 by Apple Computer, Inc.  All rights reserved.
  2. // PCISlots.r
  3.  
  4. /*
  5. FILE
  6.     PCISlots.r
  7.  
  8. NAME
  9.     PCI Slot Peek resource file
  10.  
  11. DESCRIPTION
  12.     This rez file contains resources that are used to implement
  13.     the PCI Slot Peek application.
  14.  
  15. MODIFICATION HISTORY
  16.     Created by Terry Teague
  17.  
  18.     20 Apr 95    -    TRT    -    Initial version
  19.     17 Jul 95    -    TRT    -    Tidy-up source for PPCC v1.0.5, Universal Headers v2.0 final,
  20.                                     CodeWarrior 6.1. Add support for finding slot # given driver refNum.
  21.  
  22. =============================================================================================
  23.     
  24. */    
  25.  
  26. #ifndef    __PCISLOTS_R__
  27. #define    __PCISLOTS_R__
  28.  
  29. //=============================================================================================
  30. // Standard Includes
  31. //=============================================================================================
  32.  
  33. #ifndef    __TYPES_R__
  34. #include    "Types.r"
  35. #endif
  36.  
  37. #ifndef    __SYSTYPES_R__
  38. #include    "SysTypes.r"
  39. #endif
  40.  
  41. //=============================================================================================
  42. // PCISlots Specific Includes
  43. //=============================================================================================
  44.  
  45. #define    __kPrefSize        1024        /* Default max app size */
  46.  
  47. #define    __kMinSize        512        /* Default min app size */
  48.  
  49. #define    CREATOR    'PCI?'
  50.  
  51. #define    FCREATOR    'MPS '
  52.  
  53. //#ifndef    __SIOW_R__
  54. //#include    "SIOW.r"
  55. //#endif
  56.  
  57. /*------------------------------------------------------------------------------
  58. #
  59. #    Apple Macintosh Developer Technical Support
  60. #
  61. #    MultiFinder-Aware Simple Input/Output Window
  62. #
  63. #    SIOW
  64. #
  65. #    Copyright:    © 1989-1993 by Apple Computer, Inc., all rights reserved.
  66. #
  67. ------------------------------------------------------------------------------*/
  68.  
  69. #include "SIOW.h"
  70.  
  71. #ifndef CREATOR
  72.     #define CREATOR 'siow'
  73. #endif
  74.  
  75. #ifndef FCREATOR
  76.     #define FCREATOR 'MPS '
  77. #endif
  78.  
  79. type 'pzza' {
  80.     literal longint;
  81. };
  82.  
  83. resource 'pzza' (128, purgeable) {
  84.     FCREATOR;
  85. };
  86.  
  87. /* we use an MBAR resource to conveniently load all the menus */
  88.  
  89. resource 'MBAR' (__rMenuBar, preload) {
  90.     { __mApple, __mFile, __mEdit, __mFont /*, __mSize */};        /* five menus */
  91. };
  92.  
  93.  
  94. resource 'MENU' (__mApple, preload) {
  95.     __mApple, textMenuProc,
  96.     0b1111111111111111111111111111101,    /* disable dashed line, enable About and DAs */
  97.     enabled, apple,
  98.     {
  99. //        "About S I O W\311",
  100.         "About PCISlots\311",
  101.             noicon, nokey, nomark, plain;
  102.         "-",
  103.             noicon, nokey, nomark, plain
  104.     }
  105. };
  106.  
  107. resource 'MENU' (__mFile, preload) {
  108.     __mFile, textMenuProc,
  109.     0b000000000000000000000000000000,    /* enable Quit only, program enables others */
  110.     enabled, "File",
  111.     {
  112.         "New",
  113.             noicon, "N", nomark, plain;
  114.         "Open",
  115.             noicon, "O", nomark, plain;
  116.         "-",
  117.             noicon, nokey, nomark, plain;
  118.         "Close",
  119.             noicon, "W", nomark, plain;
  120.         "Save",
  121.             noicon, "S", nomark, plain;
  122.         "Save As\311",
  123.             noicon, nokey, nomark, plain;
  124.         "-",
  125.             noicon, nokey, nomark, plain;
  126.         "Page Setup\311",
  127.             noicon, nokey, nomark, plain;
  128. // 12/13/93 - Added Command-P equivalent to Print item
  129.         "Print\311",
  130.             noicon, "P", nomark, plain;
  131.         "-",
  132.             noicon, nokey, nomark, plain;
  133.         "Quit",
  134.             noicon, "Q", nomark, plain
  135.     }
  136. };
  137.  
  138. resource 'MENU' (__mEdit, preload) {
  139.     __mEdit, textMenuProc,
  140.     0b0000000000000000000000000000000,    /* disable everything, program does the enabling */
  141.     enabled, "Edit",
  142.      {
  143.         "Undo",
  144.             noicon, "Z", nomark, plain;
  145.         "-",
  146.             noicon, nokey, nomark, plain;
  147.         "Cut",
  148.             noicon, "X", nomark, plain;
  149.         "Copy",
  150.             noicon, "C", nomark, plain;
  151.         "Paste",
  152.             noicon, "V", nomark, plain;
  153.         "Clear",
  154.             noicon, nokey, nomark, plain
  155.     }
  156. };
  157.  
  158. resource 'MENU' (__mFont, preload) {
  159.     __mFont, textMenuProc,
  160.     0b1111111111111111111111111111111,    /* enable everything */
  161.     enabled, "Font",
  162.      {
  163.      }
  164. };
  165.  
  166. /* this ALRT and DITL are used as an About screen */
  167.  
  168. resource 'ALRT' (__rAboutAlert, purgeable) {
  169. // 12/13/93 - GAB: support for native PowerPC version
  170. #ifdef APPNAME    // taller dialog for PowerPC version
  171.     {66, 58, 354, 396},
  172. #else
  173.     {66, 58, 344, 396},
  174. #endif
  175.      __rAboutAlert, {
  176.         OK, visible, silent;
  177.         OK, visible, silent;
  178.         OK, visible, silent;
  179.         OK, visible, silent
  180.     };
  181. };
  182.  
  183. resource 'DITL' (__rAboutAlert, purgeable) {
  184.     {    /* array DITLarray: 10 elements */
  185.         /* [1] */
  186. // 12/13/93 - GAB: support for native PowerPC version
  187. #ifdef APPNAME    // taller dialog for PowerPC version
  188.         {260, 129, 280, 209},
  189. #else
  190.         {233, 144, 253, 224},
  191. #endif
  192.         Button {
  193.             enabled,
  194.             "OK"
  195.         },
  196.         /* [2] */
  197. //        {8, 72, 23, 264},
  198.         {8, 120, 23, 180},
  199.         StaticText {
  200.             disabled,
  201. //            "Simple Input/Output Window"
  202.             "PCISlots"
  203.         },
  204.         /* [3] */
  205.         {56, 24, 71, 337},
  206.         StaticText {
  207.             disabled,
  208.             $$Format("Copyright ©Apple Computer, Inc. 1989-%d ", $$Year)
  209.         },
  210.         /* [4] */
  211.         {80, 108, 96, 244},
  212.         StaticText {
  213.             disabled,
  214.             "Brought to you by..."
  215.         },
  216.         /* [5] */
  217.         {109, 132, 134, 229},
  218.         StaticText {
  219.             disabled,
  220. //            "\"PZZA SLT\""
  221.             "Terry Teague"
  222.         },
  223.         /* [6] */
  224.         {152, 24, 170, 212},
  225.         StaticText {
  226.             disabled,
  227.             "Special Thanks to..."
  228.         },
  229.         /* [7] */
  230.         {176, 56, 194, 289},
  231.         StaticText {
  232.             disabled,
  233.             "Roger, Russ, Landon, Ira & Munch"
  234.         },
  235. // 12/13/93 - GAB: support for native PowerPC version
  236. #ifdef APPNAME    // for native PowerPC build only
  237.         /* [8] */
  238.         {200, 24, 218, 212},
  239.         StaticText {
  240.             disabled,
  241.             "PowerPC port by…"
  242.         },
  243.         /* [9] */
  244.         {224, 56, 242, 289},
  245.         StaticText {
  246.             disabled,
  247.             "Greg Branche"
  248.         },
  249. #endif
  250.         /* [10] */
  251. //        {32, 152, 47, 200},
  252.         {32, 110, 47, 200},
  253.         StaticText {
  254.             disabled,
  255. //            "(SIOW)"
  256.             "(using SIOW)"
  257.         }
  258.     }
  259. };
  260.  
  261. /* this ALRT and DITL are used as an error screen */
  262.  
  263. resource 'ALRT' (__rUserAlert, purgeable) {
  264.     {40, 20, 150, 260},
  265.     __rUserAlert,
  266.     { /* array: 4 elements */
  267.         /* [1] */
  268.         OK, visible, silent,
  269.         /* [2] */
  270.         OK, visible, silent,
  271.         /* [3] */
  272.         OK, visible, silent,
  273.         /* [4] */
  274.         OK, visible, silent
  275.     }
  276. };
  277.  
  278.  
  279. resource 'DITL' (__rUserAlert, purgeable) {
  280.     { /* array DITLarray: 3 elements */
  281.         /* [1] */
  282.         {80, 150, 100, 230},
  283.         Button {
  284.             enabled,
  285.             "OK"
  286.         },
  287.         /* [2] */
  288.         {10, 60, 60, 230},
  289.         StaticText {
  290.             disabled,
  291.             "Error. ^0."
  292.         },
  293.         /* [3] */
  294.         {8, 8, 40, 40},
  295.         Icon {
  296.             disabled,
  297.             2
  298.         }
  299.     }
  300. };
  301.  
  302.  
  303. #define WindowHeight     286
  304. #define WindowWidth        480
  305.  
  306. resource 'WIND' (__rDocWindow, preload, purgeable) {
  307.     {0, 0, WindowHeight, WindowWidth},
  308.     zoomDocProc, invisible, noGoAway, 0x0, "untitled"
  309. };
  310.  
  311. resource 'CNTL' (__rVScroll, preload, purgeable) {
  312.     {-1, WindowWidth-15, WindowHeight-14, WindowWidth+1},
  313.     0, invisible, 0, 0, scrollBarProc, 0, ""
  314. };
  315.  
  316. resource 'CNTL' (__rHScroll, preload, purgeable) {
  317.     {WindowHeight-15, -1, WindowHeight+1, WindowWidth-14},
  318.     0, invisible, 0, 0, scrollBarProc, 0, ""
  319. };
  320.  
  321. resource 'STR#' (__kErrStrings, purgeable) {
  322.     {
  323.     "You must run on 512Ke or later";
  324.     "Application Memory Size is too small";
  325.     "Not enough memory to run SIOW";
  326.     "Not enough memory to do Cut";
  327.     "Cannot do Cut";
  328.     "Cannot do Copy";
  329.     "Cannot exceed 32,000 characters with Paste";
  330.     "Not enough memory to do Paste";
  331.     "Cannot create window";
  332.     "Cannot exceed 32,000 characters";
  333.     "Cannot do Paste";
  334.     "Font not found";
  335.     "Cannot exceed request count during input - text truncated"
  336.     }
  337. };
  338.  
  339. /* here is the quintessential MultiFinder friendliness device, the SIZE resource */
  340.  
  341. resource 'SIZE' (-1) {
  342.     dontSaveScreen,
  343.     acceptSuspendResumeEvents,
  344.     enableOptionSwitch,
  345.     canBackground,                /* we can background; we don't currently, but our sleep value */
  346.                                 /* guarantees we don't hog the Mac while we are in the background */
  347.     multiFinderAware,            /* this says we do our own activate/deactivate; don't fake us out */
  348.     backgroundAndForeground,    /* this is definitely not a background-only application! */
  349.     dontGetFrontClicks,            /* change this is if you want "do first click" behavior like the Finder */
  350.     ignoreChildDiedEvents,        /* essentially, I'm not a debugger (sub-launching) */
  351.     is32BitCompatible,            /* this app should not be run in 32-bit address space */
  352.     reserved,
  353.     reserved,
  354.     reserved,
  355.     reserved,
  356.     reserved,
  357.     reserved,
  358.     reserved,
  359.     __kPrefSize * 1024,
  360.     __kMinSize * 1024    
  361. };
  362.  
  363.  
  364. #if 0
  365. type CREATOR as 'STR ';
  366.  
  367.  
  368. resource CREATOR (0) {
  369.     "MultiFinder-Aware Simple Input/Output Window (SIOW)"
  370. };
  371.  
  372.  
  373. resource 'BNDL' (128) {
  374.     CREATOR,
  375.     0,
  376.     {
  377.         'ICN#',
  378.         {
  379.             0, 128
  380.         },
  381.         'FREF',
  382.         {
  383.             0, 128
  384.         }
  385.     }
  386. };
  387.  
  388.  
  389. resource 'FREF' (128) {
  390.     'APPL',
  391.     0,
  392.     ""
  393. };
  394.  
  395.  
  396. resource 'ICN#' (128) {
  397.     {    /* array: 2 elements */
  398.         /* [1] */
  399.         $"0000 0000 0000 0000 0010 4100 0010 2200"
  400.         $"0020 2200 0020 2100 0020 4100 0010 4200"
  401.         $"0010 4200 0010 2200 0020 2100 0020 0100"
  402.         $"00FF FF00 03FF FFE0 0791 03F0 0ED1 0E7C"
  403.         $"1C31 321C 380D C10E 3FFF FFFE 3003 C106"
  404.         $"380D 300E 1E31 0E3C 1FC1 01F8 07FF FFE0"
  405.         $"00FF FE00",
  406.         /* [2] */
  407.         $"0000 0000 0000 0000 0010 4100 0010 2200"
  408.         $"0020 2200 0020 2100 0020 4100 0010 4200"
  409.         $"0010 4200 0010 2200 0020 2100 0020 0100"
  410.         $"00FF FF00 03FF FFE0 07FF FFF0 0FFF FFFC"
  411.         $"1FFF FFFC 3FFF FFFE 3FFF FFFE 3FFF FFFE"
  412.         $"3FFF FFFE 1FFF FFFC 1FFF FFF8 07FF FFE0"
  413.         $"00FF FE00"
  414.     }
  415. };
  416.  
  417. #endif
  418.  
  419. resource 'ALRT' (__rSaveAlert, preload) {
  420.     {72, 64, 212, 372},
  421.     __rSaveAlert,
  422.     {    /* array: 4 elements */
  423.         /* [1] */
  424.         OK, visible, silent,
  425.         /* [2] */
  426.         OK, visible, silent,
  427.         /* [3] */
  428.         OK, visible, silent,
  429.         /* [4] */
  430.         OK, visible, silent
  431.     }
  432. };
  433.  
  434. resource 'DITL' (__rSaveAlert, preload) {
  435.     {    /* array DITLarray: 4 elements */
  436.         /* [1] */
  437.         {58, 25, 76, 99},
  438.         Button {
  439.             enabled,
  440.             "Yes"
  441.         },
  442.         /* [2] */
  443.         {86, 25, 104, 99},
  444.         Button {
  445.             enabled,
  446.             "No"
  447.         },
  448.         /* [3] */
  449.         {12, 20, 45, 277},
  450.         StaticText {
  451.             disabled,
  452.             "Save changes before closing?"
  453.         },
  454.         /* [4] */
  455.         {86, 195, 104, 269},
  456.         Button {
  457.             enabled,
  458.             "Cancel"
  459.         }
  460.     }
  461. };
  462.  
  463.  
  464. // 12/13/93 - GAB: Support for native PowerPC version
  465.  
  466. #ifdef APPNAME    // only include 'cfrg' in native PowerPC apps
  467.  
  468. #include "CodeFragmentTypes.r"
  469.  
  470. resource 'cfrg' (0) {
  471.     {
  472.         kPowerPC,
  473.         kFullLib,
  474.         kNoVersionNum,kNoVersionNum,
  475.         0,0,
  476.         kIsApp,kOnDiskFlat,kZeroOffset,kWholeFork,
  477.         APPNAME    // must be defined on Rez command line with -d option
  478.     }
  479. };
  480.  
  481. #endif
  482.  
  483. // include our PCISlots specific resources
  484.  
  485. include    "PCISlots.rsrc";
  486.